<!--我的留言
<{foreach from=$list item=v}>
<img src="<{$v.userIcon}>" alt="" width="50"/>
    <{$v.userName}>
    <{$v.message}>
    <{$v.created}>
    <a href="/chat/with/<{$v.guiderId}>">回复</a>
    <a href="/tourist/message_remove/<{$v.guiderId}>">删除</a>
<{/foreach}>
-->

<h2 class="title">我的留言</h2>
<{if $list|@count == 0}>
    <div class="box-none">
        <img src="/resource/www/imgs/box_none_icon.png" class="img">
        <p class="text">抱歉，你还没有留言！</p>

    </div>
    <{else}>

    <ul class="message-list">
        <{foreach from=$list item=v}>
        <li class="li fix">
            <div class="left">
                <img src="<{$v.userIcon}>" class="img">
                <{if $v.unread.total}>
                <em class="number"><{$v.unread.total}></em>
                <{/if}>
            </div>
            <div class="center">
                <{if $v.unread.total}>
                <p class="user"><{$v.userName}> <span class="news">你有<{$v.unread.total}>条未读信息</span> </p>
                <{else}>
                <p class="user"><{$v.userName}></p>
                <{/if}>
                <div class="txt"><{$v.message}></div>
            </div>
            <div class="right">
                <p class="date"><{$v.created}></p>
                <p class="caozuo">
                    <a href="/chat/with/<{$v.guiderId}>" class="huif">回复</a>
                    <a href="javascript:;" onclick="return notice_del_confirm('<{$v.guiderId}>');" class="del">删除</a>
                </p>
            </div>
        </li>
        <{/foreach}>

    </ul>
    <{/if}>
    <{$pagination}>
<script>
$('.message').addClass('active');

function notice_del_confirm(id){

    layer.confirm('确认删除这条信息吗', {
            btn: ['是的','取消'], //按钮
            title: false,
            area: ['200px', '150px']
        },function(){
            var url = '/tourist/message_remove/'+id;
            location.href=url;
        },function(){
            return true;
    });
}

</script>
